﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace PracticeAzure.Website.Shared
{
    public class CacheFactory
    {
        private static ICache _cache;
        private static object _lockobj = new object();

        public static ICache Current
        {
            get
            {
                if (_cache == null)
                {
                    lock (_lockobj)
                    {
                        if (_cache == null)
                        {
                            // hard code to return the InProcCache
                            _cache = new InProcCache();
                        }
                    }
                }
                return _cache;
            }
        }
    }
}